//入口文件
import Vue from 'vue'

//导入时间插件
import moment from 'moment'
//定义全局的时间过滤器
Vue.filter('dataFormat',function(dataStr,pattern="YYYY-MM-DD HH:mm:ss"){
    return moment(dataStr).format(pattern)
})

//导入vue-resource 轮播图
import VueResource from 'vue-resource'
Vue.use(VueResource)
//设置请求的跟路径
// Vue.http.options.root = 'http://vue.studyit.io';

//导入MUI样式
import './lib/dist/css/mui.min.css'
import './lib/dist/css/icons-extra.css'

//mint-ui中的组件
import { Header,Swipe,SwipeItem,Button } from 'mint-ui'
Vue.component(Header.name, Header)
Vue.component(Swipe.name, Swipe)
Vue.component(SwipeItem.name, SwipeItem)
Vue.component(Button.name, Button)

//导入路由
import VueRouter from 'vue-router'
Vue.use(VueRouter)

//导入router.js路由
import router from './router.js'

//导入App组件
import app from './App.vue'

var vm = new Vue({
    el:'#app',
    render:c=>c(app),
    router
})